
import { isBind } from "../sgApi/index.js"
import router from '../router'
export function isbind() {
    
      
    // if(JSON.parse(localStorage.getItem("obj")).nickname =="不喝甜水"  ){
    //     this.$router.replace({
    //         path: "/login"
    //     })
    // }else{
        
        isBind({
            openid: JSON.parse(localStorage.getItem("obj")).openid || ""
        }).then(res => {
            if (res.isCustomerBind == 1) {
              
    
            } else {
                router.replace({
                    path: "/login"
                }).catch(err => { console.log(err) })
            }
    
        })
    // }

  




   



}